package com.zx.domain;

import java.sql.Date;

public class Student {

    //  javabean中的成员变量要与数据库的字段类型和名称相匹配
    private int id;
    private String sname;
    private String gender;
    private Date birthday; //  与数据库中date类型匹配

    public Student() {
    }

    public Student(int id, String sname, String gender, Date birthday) {
        this.id = id;
        this.sname = sname;
        this.gender = gender;
        this.birthday = birthday;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", sname='" + sname + '\'' +
                ", gender=" + gender +
                ", birthday=" + birthday +
                '}';
    }
}
